package writtenexamination.shenzhou;

/**
 * @author cyt
 * @create 2020-10-15 下午 2:29
 */
public class Tb {
    public static void main(String[] args) {

    }

    public int findGreatestSumOfSubArray(String[] array) {
        int[] ints = new int[array.length];
        for (int i = 0; i < array.length; i++) {
            ints[i] = Integer.parseInt(array[i]);
        }
        int max = ints[0];
        int res = ints[0];
        for (int i = 1; i < ints.length; i++) {
            max = Math.max(max + ints[i], ints[i]);
            res = Math.max(res, max);
        }
        return res;
    }

}
